<%@ page language="java"%>
<%@ page import="java.util.List" %>
<%@ page import=" BE.Tipocliente" %>
<%@ page import=" BE.Tipoidentificacion" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>
<html:html locale="true">
    <head>
        <title>Mobius</title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <meta name="viewport" content="minimum-scale=1.0, width=device-width, maximum-scale=1.6, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon" href="mobClientes/Images/WebClipIcon.png">
        <link rel="stylesheet" href="mobClientes/mobClientes.css">
        <script type="text/javascript" src="mobClientes/Parts/utilities.js" charset="utf-8"></script>
        <script type="text/javascript" src="mobClientes/Parts/setup.js" charset="utf-8"></script>
        <script type="text/javascript" src="mobClientes/mobClientes.js" charset="utf-8"></script>
        <script type="text/javascript" src="mobClientes/Parts/Text.js" charset="utf-8"></script>
        <script type="text/javascript" src="mobClientes/Parts/PushButton.js" charset="utf-8"></script>
        <script type="text/javascript" src="mobClientes/Parts/ButtonHandler.js" charset="utf-8"></script>
        <%
        String strMensaje = "";

        if ((request != null) && (request.getAttribute("strMensaje") != null) && (!request.getAttribute("strMensaje").equals(""))) {
            strMensaje = (String) request.getAttribute("strMensaje");
        }

        List<Tipocliente> arrTipoCliente = null;
        List<Tipoidentificacion> arrTipoIdDoc = null;

        if (session.getAttribute("arrTipoCliente") != null) {
            arrTipoCliente = (List<Tipocliente>) session.getAttribute("arrTipoCliente");
        }
        ;

        if (session.getAttribute("arrTipoIdentificacion") != null) {
            arrTipoIdDoc = (List<Tipoidentificacion>) session.getAttribute("arrTipoIdentificacion");
        }
        ;

        %>

        <script type="text/javascript" charset="utf-8">
            addEventListener('load', function() {
                setTimeout(hideAddressBar, 0);
            }, false);
            function hideAddressBar() {
                window.scrollTo(0, 1);
            }
        </script>
    </head>
    <body onload="load();">
        <html:form action="BuscarCliente">

            <input type="hidden" id="mensaje" value="<%= strMensaje%>">

            <div id="content1">
                <div apple-part="com.apple.Dashcode.part.rectanglewebshape" apple-style="image-theme: 2; image-shape: 3; image-button-type: 3; image-opacity: 1.00; image-top-color: 0,0,0,1; image-bottom-color: 1,1,1,1; image-radius: 0,0,0,0; image-border: 1; image-border-color: 0.147959173,0.147959173,0.147959173,1; image-border-width: 0; shine-on: 0; shine-strength: 0.14; shine-alpha-level: 0.00; shine-height: 0.48; glass-arc-height: 0.06; embossed-on: 0; embossed-depth: 1; embossed-shadow: 0; embossed-highlight: 0.1; image-include-custom: 1; image-custom-image-path: mobToolbarBackground 1.png; image-custom-center: 1; image-custom-resize: 2; shadow-include-shadow: 0;" id="header" apple-group="header">
                    <div apple-part="com.apple.Dashcode.part.pushbutton" class="apple-no-children" apple-text-overflow="ellipsis" apple-style="image-theme: 0; image-shape: 3; image-button-type: 0; image-opacity: 1.00; image-top-color: 0,0,0,1; image-bottom-color: 1,1,1,1; image-radius: 5,5,5,5; image-border: 1; image-border-color: 0,0,0,0.2; image-border-width: 1; shine-on: 1; shine-strength: 0.16; shine-alpha-level: 0.00; shine-height: 0.50; glass-arc-height: 0.00; embossed-on: 1; embossed-depth: 1; embossed-shadow: 0.68; embossed-highlight: 0.3; shadow-include-shadow: 0;" id="btnAgregar"></div>
                    <div apple-part="com.apple.Dashcode.part.webtext" class="apple-text apple-no-children" apple-default-image-visibility="hidden" apple-text-overflow="ellipsis" id="text"></div>
                    <div apple-part="com.apple.Dashcode.part.gobackbutton" class="apple-no-children" apple-text-overflow="ellipsis" apple-style="image-theme: 0; image-shape: 11; image-button-type: 0; image-opacity: 1.00; image-top-color: 0,0,0,1; image-bottom-color: 1,1,1,1; image-radius: 5,5,5,5; image-border: 1; image-border-color: 0,0,0,0.2; image-border-width: 1; shine-on: 1; shine-strength: 0.17; shine-alpha-level: 0.04; shine-height: 0.50; glass-arc-height: 0.00; embossed-on: 1; embossed-depth: 1; embossed-shadow: 0.68; embossed-highlight: 0.3; shadow-include-shadow: 0;" id="btnAtras"></div>
                </div>
                <div apple-part="com.apple.Dashcode.part.box" id="gbxInfoMobius" apple-group="TipoCliente3">
                    <div apple-part="com.apple.Dashcode.part.webtext" class="apple-text apple-no-children subtitulo" apple-default-image-visibility="hidden" apple-text-overflow="ellipsis" id="subInfoMobius" apple-style="part-width-dependent: true;part-height-dependent: true;"></div>
                    <div apple-part="com.apple.Dashcode.part.webtext" class="apple-text apple-no-children" apple-default-image-visibility="hidden" apple-text-overflow="ellipsis" id="lblCodMobius"></div>


                    <!--Inputs-->
                    <input type="text" name="codigo" class="apple-textfield apple-no-children" apple-part="com.apple.Dashcode.part.textfield" id="txtCodMobius" onkeypress="return isNumberKey(event)" onclick="limpiarContenidoCodigo(event)" maxlength="10">

                </div>
                <div apple-part="com.apple.Dashcode.part.box" id="gbxTipoCliente" apple-group="TipoCliente2">
                    <div apple-part="com.apple.Dashcode.part.webtext" class="apple-text apple-no-children subtitulo" apple-default-image-visibility="hidden" apple-text-overflow="ellipsis" id="subTipoCliente1" apple-style="part-width-dependent: true;part-height-dependent: true;"></div>
                    <div apple-part="com.apple.Dashcode.part.webtext" class="apple-text apple-no-children" apple-default-image-visibility="hidden" apple-text-overflow="ellipsis" id="lblTipoCliente"></div>


                    <!-- Select -->
                    <select apple-part="com.apple.Dashcode.part.inputpopupbutton" apple-style-relative="height: 20px;" name="tipoCliente" id="cbxTipoCliente" apple-group="cbxTipoCliente2" onchange="CambioTipoCliente(event)">
                        <%
                           for (int i = 0; i < arrTipoCliente.size(); i++) {
                           out.println("<option class=\"apple-hidden\" id=\"" + (arrTipoCliente.get(i)).getCvNombre() + "\" value=\"" + (arrTipoCliente.get(i)).getSrlTipocliente() + "\">" + (arrTipoCliente.get(i)).getCvNombre() + "</option>");
                            }
                        %>
                    </select>


                </div>
                <div apple-part="com.apple.Dashcode.part.box" id="gbxInfoPersonal" apple-group="InfoPersonalNatural1">
                    <div apple-part="com.apple.Dashcode.part.webtext" class="apple-text apple-no-children subtitulo" apple-default-image-visibility="hidden" apple-text-overflow="ellipsis" id="subInfoPersonal" apple-style="part-width-dependent: true;part-height-dependent: true;"></div>
                    <div apple-part="com.apple.Dashcode.part.webtext" class="apple-text apple-no-children" apple-default-image-visibility="hidden" apple-text-overflow="ellipsis" id="lblNombres"></div>
                    <div apple-part="com.apple.Dashcode.part.webtext" class="apple-text apple-no-children" apple-default-image-visibility="hidden" apple-text-overflow="ellipsis" id="lblTipoDocIdentidad"></div>


                    <!--Inputs-->
                    <input type="text" name="nombre" class="apple-textfield apple-no-children" apple-part="com.apple.Dashcode.part.textfield" id="txtNombres" onclick="limpiarContenidoNombre(event)" maxlength="50">
                    <input type="text" name="apellidos" class="apple-textfield apple-no-children" apple-part="com.apple.Dashcode.part.textfield" id="txtApellidos" onclick="limpiarContenidoApellidos(event)" maxlength="50">




                    <div apple-part="com.apple.Dashcode.part.rectanglewebshape" apple-style="image-theme: 1; image-shape: 3; image-button-type: 3; image-opacity: 1.00; image-top-color: 1,1,1,1; image-bottom-color: 0.615400016,0.615400016,0.615400016,1; image-radius: 0,0,0,0; image-border: 1; image-border-color: 0.619565248,0.619565248,0.619565248,1; image-border-width: 1; shine-strength: 0.90; shine-alpha-level: 0.67; shine-height: 0.50; glass-arc-height: 0.06; shadow-include-shadow: 0;" id="rectangleShape2">
                    </div>
                    <div apple-part="com.apple.Dashcode.part.rectanglewebshape" apple-style="image-theme: 1; image-shape: 3; image-button-type: 3; image-opacity: 1.00; image-top-color: 1,1,1,1; image-bottom-color: 0.615400016,0.615400016,0.615400016,1; image-radius: 0,0,0,0; image-border: 1; image-border-color: 0.619565248,0.619565248,0.619565248,1; image-border-width: 1; shine-strength: 0.90; shine-alpha-level: 0.67; shine-height: 0.50; glass-arc-height: 0.06; shadow-include-shadow: 0;" id="rectangleShape3">
                    </div>
                    <div apple-part="com.apple.Dashcode.part.webtext" class="apple-text apple-no-children" apple-default-image-visibility="hidden" apple-text-overflow="ellipsis" id="lblNroDoc"></div>



                    <!-- Select -->
                    <select apple-part="com.apple.Dashcode.part.inputpopupbutton" apple-style-relative="height: 20px;" name ="tipoDoc" id="cbxTipoDocumentoIdentidad" apple-group="cbxTipoCliente3" onchange="CambioTipoCliente(event)">
                        <%
                           for (int i = 0; i < arrTipoIdDoc.size(); i++) {
                           out.println("<option class=\"apple-hidden\" id=\"" + (arrTipoIdDoc.get(i)).getCvNombreidentificacion() + "\" value=\"" + (arrTipoIdDoc.get(i)).getSrlIdtipoidentificacion() + "\">" + (arrTipoIdDoc.get(i)).getCvNombreidentificacion() + "</option>");
                            }
                        %>
                    </select>


                    <div apple-part="com.apple.Dashcode.part.rectanglewebshape" apple-style="image-theme: 1; image-shape: 3; image-button-type: 3; image-opacity: 1.00; image-top-color: 1,1,1,1; image-bottom-color: 0.615400016,0.615400016,0.615400016,1; image-radius: 0,0,0,0; image-border: 1; image-border-color: 0.619565248,0.619565248,0.619565248,1; image-border-width: 1; shine-strength: 0.90; shine-alpha-level: 0.67; shine-height: 0.50; glass-arc-height: 0.06; shadow-include-shadow: 0;" id="rectangleShape1">
                    </div>
                    <div apple-part="com.apple.Dashcode.part.webtext" class="apple-text apple-no-children" apple-default-image-visibility="hidden" apple-text-overflow="ellipsis" id="lblApellidos"></div>


                    <!--Inputs-->
                    <input type="text" name="nroDocumento" class="apple-textfield apple-no-children" apple-part="com.apple.Dashcode.part.textfield" id="txtNroDoc" onkeypress="return isNumberKey(event)" onclick="limpiarContenidoNroDoc(event)" maxlength="20">



                </div>

               <!--<div apple-part="com.apple.Dashcode.part.pushbutton" apple-default-image-visibility="hidden" class="apple-no-children" apple-text-overflow="ellipsis" apple-style="image-theme: 0; image-shape: 3; image-button-type: 0; image-opacity: 1.00; image-top-color: 1,1,1,1; image-bottom-color: 1,1,1,1; image-radius: 5,5,5,5; image-border: 1; image-border-color: 0,0,0,0.2; image-border-width: 2; shine-on: 0; shine-strength: 0.17; shine-alpha-level: 0.04; shine-height: 0.50; glass-arc-height: 0.00; embossed-on: 0; embossed-depth: 1; embossed-shadow: 0.68; embossed-highlight: 0.3; shadow-include-shadow: 0;" id="btnBuscar"></div>-->
               <!--<div apple-part="com.apple.Dashcode.part.pushbutton" apple-default-image-visibility="hidden" class="apple-no-children" apple-text-overflow="ellipsis" apple-style="image-theme: 0; image-shape: 3; image-button-type: 0; image-opacity: 1.00; image-top-color: 1,1,1,1; image-bottom-color: 1,1,1,1; image-radius: 5,5,5,5; image-border: 1; image-border-color: 0,0,0,0.2; image-border-width: 2; shine-on: 0; shine-strength: 0.17; shine-alpha-level: 0.04; shine-height: 0.50; glass-arc-height: 0.00; embossed-on: 0; embossed-depth: 1; embossed-shadow: 0.68; embossed-highlight: 0.3; shadow-include-shadow: 0;" id="btnCancelar"></div>-->
            </div>
            <html:submit styleId="btnBuscar" property="submit">
                <bean:message key="button.Buscar"/>
            </html:submit>
            <input type="button" name="submit" value="Cancelar" id="btnCancelar" onclick="limpiarDatosDeFormulario(event)">
        </html:form>
    </body>
</html:html>